/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.base.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.base.entity.StoreCare;

/**
 * 店面护理DAO接口
 * @author liujiang
 * @version 2013-09-26
 */
public interface StoreCareDao extends StoreCareDaoCustom, CrudRepository<StoreCare, Long> {
	@Query("from StoreCare where STORE_ID = ?1")
	public List<StoreCare> findListByStore(Long id);

	@Query("from StoreCare where STORE_ID = ?1 AND CARE_TYPE = 0 AND CT_CARE_ID = ?2")
	public StoreCare getByCare(Long storeId, Long careId);
	
	@Query("from StoreCare where STORE_ID = ?1 AND CARE_TYPE = ?2")
	public List<StoreCare> findListByStore(Long id,int careType);
	
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreCareDaoCustom extends BaseDao<StoreCare> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreCareDaoImpl extends BaseDaoImpl<StoreCare> implements StoreCareDaoCustom {

}
